<div class="wrap">
    <div id="icon-upload" class="icon32"><br></div>
    <h2>Přehled vysílání</h2>
    <br />
    <div id="poststuff" class="metabox-holder">        
        <div id="post-body">
            <div id="post-body-content">
                <div class="stuffbox" style="margin:0">
                    <h3><label for="link_name">Historie změn</label></h3>
                    {if $pager.cntRecords > 0}
                    <form method="post" action="{link target='self:commitChanges'}">
                        <div class="ads-form-header" style="margin:0;padding: 10px">
                            <input name="save" type="submit" class="button-primary" id="publish" value="Potvrdit změny">
                            <small style="margin-left: 5px;color: #333">Počet nepotvrzených změn : {$pager.cntRecords}</small>
                            <div class="clear"></div>
                        </div>
                    </form>
                    {else}
                    <!-- TODO: info o aktualni verzi vysilani -->
                    {/if}
                    <div class="inside" style="padding:0;margin:0"> 
                        <table class="changes" cellspacing="0">
                            <tbody>
                                {foreach $changes as $change}
                                <tr class="{cycle values=',alternate'}">
                                    <td class="change">{$change.message|escape}</td>
                                    <td><small style="color:#888;text-align: right;display: block">{$change.date|escape}, {$change.user_login|escape}</small></td>
                                </tr>
                                {foreachelse}
                                <tr class="{cycle values=',alternate'}">
                                    <td>V projektu se nenachází žádné nepotvrzené změny.</td>
                                </tr>
                                {/foreach}
                            </tbody>
                        </table>
                    </div>
                </div>   
                <div class="tablenav bottom">
                    {include file="pager.tpl" pager=$pager page='defaultAction' append='orderBy,order'}
                    <br class="clear">
                </div>
                <table style="width: 100%">
                    <tr>
                        <td style="width:640px">
                            <div class="stuffbox" style="margin:0;width:640px;">
                                <h3><label for="link_name">Rozvržení vysílání</label></h3>
                                <div class="ads-form-header" style="margin:0;padding: 5px 0 7px;">
                                    <div id="major-publishing-actions">
                                        <div style="display: block; float:left; margin: 0 5px 0 0">
                                            <a href="{site_url()}?scale=33.33" class="button-secondary" target="preview">Přehrát</a>
                                        </div>
                                        <div style="display: block; float:left;">
                                            <a href="{link target='self:stopPreview'}" class="button-secondary" target="preview">Zastavit</a>
                                        </div>
                                        <div class="clear"></div>
                                    </div>
                                    <div class="clear"></div>
                                </div>
                                <!--                                <div class="ads-form-header" style="margin:0;padding: 5px 0 7px;">
                                                                    <div id="major-publishing-actions">
                                                                        <div style="display: block; float:left; width: 25%;">    
                                                                            {if $slide.position > 1}
                                                                            <a href="{link target='self:defaultAction' position=$slide.position-1}" class="button-secondary">&lsaquo; Zpět</a>
                                                                            {else}
                                                                            <a href="{link target='self:defaultAction' position=$maxPosition}" class="button-secondary">&lsaquo; Zpět</a>
                                                                            {/if}                                                                                                                        
                                                                        </div>
                                                                        <div style="display: block; float:left; width: 50%;text-align: center;">
                                                                            <a href="{link target='slide:editItems' slideId=$slide.slideId}"><span style="font-weight: bold;line-height: 15px;padding: 3px 10px;">{$slide.name}</span></a>
                                                                        </div>
                                                                        <div style="display: block; float:left; width: 25%;text-align: right;">
                                                                            {if $slide.position+1 <= $maxPosition}
                                                                            <a href="{link target='self:defaultAction' position=$slide.position+1}" class="button-secondary">Vpřed &rsaquo;</a>
                                                                            {else}
                                                                            <a href="{link target='self:defaultAction' position=1}" class="button-secondary">Vpřed &rsaquo;</a>
                                                                            {/if}
                                                                        </div>
                                                                        <div class="clear"></div>
                                                                    </div>
                                                                    <div class="clear"></div>
                                                                </div>-->
                                <div class="inside" style="padding:0px;margin:0;height:{$preview.height|escape}px;"> 
                                    <iframe src="{link target='self:stopPreview'}" width="100%" height="100%" name="preview"></iframe>
                                </div>
                            </div>  
                            <!--                            <div class="stuffbox" style="margin:0;width:640px;">
                                                            <h3><label for="link_name">Rozvržení vysílání</label></h3>
                                                            <div class="ads-form-header" style="margin:0;padding: 5px 0 7px;">
                                                                <div id="major-publishing-actions">
                                                                    <div style="display: block; float:left; width: 25%;">    
                                                                        {if $slide.position > 1}
                                                                        <a href="{link target='self:defaultAction' position=$slide.position-1}" class="button-secondary">&lsaquo; Zpět</a>
                                                                        {else}
                                                                        <a href="{link target='self:defaultAction' position=$maxPosition}" class="button-secondary">&lsaquo; Zpět</a>
                                                                        {/if}                                                                                                                        
                                                                    </div>
                                                                    <div style="display: block; float:left; width: 50%;text-align: center;">
                                                                        <a href="{link target='slide:editItems' slideId=$slide.slideId}"><span style="font-weight: bold;line-height: 15px;padding: 3px 10px;">{$slide.name}</span></a>
                                                                    </div>
                                                                    <div style="display: block; float:left; width: 25%;text-align: right;">
                                                                        {if $slide.position+1 <= $maxPosition}
                                                                        <a href="{link target='self:defaultAction' position=$slide.position+1}" class="button-secondary">Vpřed &rsaquo;</a>
                                                                        {else}
                                                                        <a href="{link target='self:defaultAction' position=1}" class="button-secondary">Vpřed &rsaquo;</a>
                                                                        {/if}
                                                                    </div>
                                                                    <div class="clear"></div>
                                                                </div>
                                                                <div class="clear"></div>
                                                            </div>
                                                            <div class="inside" style="padding:0px;margin:0;height:{$preview.height|escape}px;position:relative;background:url({$preview.background|escape}) no-repeat left top" id="framePreviewWrapper"> 
                                                                {foreach $preview.frames as $frame}
                                                                <div style="
                                                                     position: absolute; 
                                                                     left: {$frame.dimensions.position.0|escape}px; 
                                                                     top: {$frame.dimensions.position.1|escape}px;
                                                                     width: {$frame.dimensions.size.0|escape}px;
                                                                     height: {$frame.dimensions.size.1|escape}px;
                                                                ">
                                                                    <a href="{link target='dataframe:editItems' frameId=$frame.frameId}" class="previewLink">Upravit obsah</a>
                                                                </div>
                                                                {/foreach}
                                                            </div>
                                                        </div>  -->
                        </td>
                        <td style="vertical-align: top">
                            <div class="stuffbox" style="margin:0 0 0 20px;">
                                <h3><label for="link_name">Informace o vysílání</label></h3>
                                <div class="inside" style="margin:0;padding:0"> 
                                    <table class="changes" cellspacing="0">
                                        <tbody>
                                            <tr class="{cycle values=',alternate'}">
                                                <td>Online přehrávače:</td><td>1 z 2</td>
                                            </tr>
                                            <tr class="{cycle values=',alternate'}">
                                                <td>Počet vysílacích rámců:</td><td>{$maxPosition} rámce</td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div> 
                        </td>
                    </tr>
                </table>


            </div>
        </div>
    </div>    
</div>
